<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/admin/rbac_show.css" />
<script type="text/javascript" src="__PUBLIC__/js/jquery-1.8.2.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/access.js"></script>
</head>
<body>
<form action="<?php echo U('Admin/Rbac/setAccess');?>" method="post">
<div id="wrap">
      <a href="<?php echo U('Admin/Rbac/roleMg');?>" class="add-app">返回</a>
	<?php if(is_array($nodelist)): $i = 0; $__LIST__ = $nodelist;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><div class="app">
		   <p>
			<strong><?php echo ($vo["title"]); ?></strong>
			<input type="checkbox" name="access[]" value="<?php echo ($vo["id"]); ?>_1" level="1" <?php if($vo['access']): ?>checked='checked'<?php endif; ?> />
		</p>
		
		<?php if(is_array($vo['child'])): $i = 0; $__LIST__ = $vo['child'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$action): $mod = ($i % 2 );++$i;?><dl>
			<dt>
				<strong><?php echo ($action["title"]); ?></strong>
				<input type="checkbox" name="access[]" value="<?php echo ($action["id"]); ?>_2" level="2" <?php if($action['access']): ?>checked='checked'<?php endif; ?> />
			</dt>
			<?php if(is_array($action['child'])): $i = 0; $__LIST__ = $action['child'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$function): $mod = ($i % 2 );++$i;?><dd>
					<?php echo ($function["title"]); ?>
					<input type="checkbox" name="access[]" value="<?php echo ($function["id"]); ?>_3" level="3" <?php if($function['access']): ?>checked='checked'<?php endif; ?> />
				 
			</dd><?php endforeach; endif; else: echo "" ;endif; ?>
		</dl><?php endforeach; endif; else: echo "" ;endif; ?>
	 </div><?php endforeach; endif; else: echo "" ;endif; ?>
</div>
<input type="hidden" name="rid" value="<?php echo ($rid); ?>">
<input type="submit" value="保存" class="submit">
</form>
</body>
</html>